from Util import loadTestData

import pytest
import os

suiteName = {
    "test_groupManagementPage": {"TestManagementPage": "managementPage"},
    "test_sharingCenterPage": {},
    "test_systemDefinitionPage": {},
    "test_timedTasksPage": {}
}

managementPage_data, managementPage_caseName = loadTestData.get_ymlTestData(
    loadTestData.get_ymlDataPath(os.path.dirname(__file__)),
    suiteName["test_groupManagementPage"]["TestManagementPage"])


@pytest.fixture(params=managementPage_data, ids=managementPage_caseName, scope="class")
def managementPage_testData(request) -> dict:
    # 返回数据
    return request.param


if __name__ == '__main__':
    # print(os.path.dirname(__file__))
    print(suiteName["test_groupManagementPage"]["TestManagementPage"])
    print(loadTestData.get_ymlDataPath(os.path.dirname(__file__)))
    print(loadTestData.get_ymlTestData(loadTestData.get_ymlDataPath(os.path.dirname(__file__)),
                                       suiteName["test_groupManagementPage"]["TestManagementPage"]))
